<!-- Begin one column window -->
<div class="onecolumn">
    <div class="header">
        <span style="font-weight: bold; text-align: center; color: red;">Danh sách bạn đọc đăng mượn sách online</span>
    </div>
    <br class="clear"/>
    <div class="content">
        <?php if (isset($paginator) && $paginator != null): ?>
            <table class="data" width="100%" cellpadding="0" cellspacing="0">
                <thead>
                    <tr>
                        <th style="width:10%">Mã bạn đọc</th>
                        <th style="width:10%">Mã tài iiệu</th>
                        <th style="width:40%">Mô tả tài liệu</th>
                        <th style="width:13%">Vị trí</th>
                        <th style="width:12%">Tình trạng</th>
                        <th style="width:15%">Thao tác</th>
                    </tr>
                </thead>
                <tbody>
                    <?php foreach ($paginator as $row) : ?>
                        <tr>
                            <td><?php echo $this->escapeHtml($row->cardBarcode); ?></td>
                            <td><?php echo $this->escapeHtml($row->bookBarcode . '-' . $row->serial); ?></td>
                            <td><?php echo $this->escapeHtml($row->title) . " " . $this->escapeHtml($row->paperSize); ?>
                                <br/>
                                <?php echo $this->escapeHtml($row->bookDescription); ?>
                            </td>
                            <td><?php echo $this->escapeHtml($row->location); ?></td>
                            <td><?php
                                if ($row->orderStatus == 0)
                                    echo $this->escapeHtml("Đang xử lý");
                                else if($row->orderStatus == 1)
                                    echo $this->escapeHtml("chấp nhận");
                                else if($row->orderStatus == -1)
                                      echo $this->escapeHtml("từ chối");
                                ?>
                            </td>
                            <td>
                                <a href="<?php echo $this->url('order-online-management/default',array('action' => 'apply','id' => $row->bookID))?>"><img src=<?php echo $this->basePath() . '/img/icon_accept.png' ?> alt="edit" class="help" title="Chấp nhận"/></a>
                                <a href="<?php echo $this->url('order-online-management/default',array('action' => 'deny','id' => $row->bookID))?>" style="margin-left: 30px;"><img src=<?php echo $this->basePath() . '/img/icon_delete.png' ?> alt="deny" class="help" title="Từ chối"/></a>
                                <a href="<?php echo $this->url('order-online-management/default',array('action' => 'delete','id' => $row->bookID))?>" style="margin-left: 30px;"><img src=<?php echo $this->basePath() . '/img/delete.png' ?> alt="delete" class="help" title="Xóa"/></a>
                            </td>
                        </tr>
                    <?php endforeach; ?>
                </tbody>
            </table>
            <?php
            // add at the end of the file after the table
            echo $this->paginationControl(
                    // the paginator object
                    $this->paginator,
                    // the scrolling style; see http://zf2.readthedocs.org/en/release-2.1.4/modules/zend.paginator.usage.html#rendering-pages-with-view-scripts
                    'sliding',
                    // the partial to use to render the control
                    array('partial/paginator.phtml', 'Admin'),
                    // the route to link to when a user clicks a control link
                    array(
                'route' => 'list-user'
                    )
            );
            ?>
        <?php endif; ?>
    </div>
</div>
<!-- End one column window -->